Threads in C# [Question]

Posted by blez on Stack Overflow See other posts from Stack Overflow or by blez
Published on 2010-05-02T16:45:50Z Indexed on 2010/05/02 16:57 UTC
Read the original article Hit count: 206

Filed under:
|

Thread1/2: do TotalThreads-- on their exit

int TotalThreads = 2;

void AsyncFunc() {
 // run thread for Func()
}

void Func() {
 // run Thread1 
 // run Thread2
 while(TotalThreads > 0) { /* do nothing */ }
 // some code
}  

is that bad design?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET